home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / More Source / Pascal / Book Demos in Pascal / SpriteEngine / SE Timer / SpriteStructure.p < prev   
Text File  |  1995-04-06  |  860b  |  38 lines

  1. unit SpriteStructure;
  2.  
  3. {This unit defines the SpriteRecord structure. It i a separate unit since it}
  4. {is likely to be edited.}
  5.  
  6. interface
  7.  
  8. {$setc _hasfixedpoint := true}
  9.  
  10. {$IFC UNDEFINED THINK_PASCAL}
  11.     uses Types, QuickDraw;
  12. {$ENDC}
  13.  
  14.     type
  15.         EntityType = (    randomPositionSprite,
  16.     randomSpeedSprite,
  17.     randomImpulseSprite,
  18.     changeSometimesSprite
  19. );
  20.  
  21.         SpritePtr = ^SpriteRecord;
  22.         SpriteRecord = record
  23. (*Game entity data - edit as desired*)
  24.                 kind: EntityType;
  25.                 lastTime: Longint;
  26.                 speed: Point;                (* Fixed-point! *)
  27.                 fixedPointPosition: Point;
  28. (*Sprite data - don't remove*)
  29.                 position: Point;            (* Integer screen coordinates! *)
  30.                 face: GrafPtr;                (* Apprearance of the sprite *)
  31.                 drawingRect: Rect;        (* Where is it? *)
  32. (*List pointers - don't remove*)
  33.                 prev, next: SpritePtr;        (* Next enity in the list *)
  34.             end;
  35.  
  36. implementation
  37. end.
  38.